<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for</title>
    <script src="./js/vue.js"></script>
</head>
<body>
<div id="app">

<!--    循环数组-->
<p v-for="(v,i) in arg">{{i}}.{{v}}</p>

<!--    循环对象-->
    <p v-for="(v,k,i) in student">{{i}}.{{k}}:{{v}}</p>

<!--    循环对象数组-->
    <p v-for="stu in students">
        <span v-for="(v,k) in stu">
            {{k}}:{{v}}  &nbsp;  &nbsp;
        </span>
    </p>
</div>

<script>
    new Vue({
        el:"#app",
        data: {
            arg: ["wkk","pmx","syc"],
            student: {
                name: "wkk",
                age : 18,
                address: "zz"
            },
            students: [
                {
                    name:"wkk",
                    age: 18
                },
                {
                    name:"ddd",
                    age:19
                }
            ]
        }
    });
</script>
</body>
</html>